package extreme.tddscaffold;

public class AgedBrie {
    private int sellIn;
    private int quality;
    private String name;

    public AgedBrie(String name, int sellIn, int quality) {
        this.name = name;
        this.sellIn = sellIn;
        this.quality = quality;

    }

    public AgedBrie() {

    }

    public int CommodityPrice() {
        if (name == "AgedBrie") {
            if (sellIn > 0) {
                return quality;
            } else if (sellIn <= 0) {
                for (int i = 0; i <= 0 - sellIn; i++) {
                    quality += 1;
                }
            }
            return quality;
        }
        return quality;
    }
}
